package com.training.food.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.training.food.Domain.HisOrder;
import com.training.food.Domain.Release;
import com.training.food.Domain.StatisticsDomain;
import com.training.food.pojo.Retail;
import com.training.food.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
@Mapper
public interface RetailMapper extends BaseMapper<Retail> {
    int add(Retail retail);
    void delete(Retail retail);
    Retail select(Retail retail);
    void update(Retail retail);
    List<Retail>selectByUser(@Param("username")String username, @Param("state")String state,@Param("description")String description);
    Retail selectById( Retail retail);
    List<Retail> selectAll();
    List<Retail>selectAllNull(@Param("tmp")String tmp);
    //    更新交易状态
    void updateState(@Param("wsid") int wsid,@Param("state") String state);
    //添加订单
    void addReleaseOrder(@Param("contain") Release release, @Param("user") User user, @Param("state") char state);
    //展示所有历史订单
    List<HisOrder> allReleaseShow(@Param("user") User user, @Param("states")List<String> states);
    List<Retail>retails(@Param("message") String message);
    //ZZM查询所有为被处理订单
    List<Retail> getOrder(@Param("state") String state);
    //ZZM获取状态为3的数量
    int get3num();
    //ZZM获取种类及其数据
    List<StatisticsDomain> getttv();
}
